import request from '@/utils/request';

const api = {
  listApi: '/api/list',
  addApi: '/api/add',
};

export function listApi(data: object) {
  return request({
    url: api.listApi,
    method: 'get',
    params: data,
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded',
    },
  });
}

export function addApi(data: object) {
  return request({
    url: api.addApi,
    method: 'post',
    data,
  });
}

export default {
  listApi,
  addApi,
};
